//引入自定义的hook
import useCounter from "./04.自定义hook"
const Base = props => {
    let [counter, tool] = useCounter(10)
    return (
        <fieldset>
            <legend>基础组件</legend>
            <h1>counter:{counter}</h1>
            <button onClick={tool.add}>+</button>
            <button onClick={tool.minus}>-</button>
            <button onClick={tool.multi}>X</button>
            <button onClick={tool.divide}>/</button>
        </fieldset>
    )
}

export default Base